<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Faiss: faiss::gpu::detail::SubTensor&lt; TensorType, 0, PtrTraits &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Faiss
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacefaiss.html">faiss</a></li><li class="navelem"><b>gpu</b></li><li class="navelem"><a class="el" href="namespacefaiss_1_1gpu_1_1detail.html">detail</a></li><li class="navelem"><a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html">SubTensor< TensorType, 0, PtrTraits ></a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">faiss::gpu::detail::SubTensor&lt; TensorType, 0, PtrTraits &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Specialization for a view of a single value (0-dimensional)  
 <a href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5c15de3c68277e250091885b6d139d52"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c15de3c68277e250091885b6d139d52"></a>
__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor.html">SubTensor</a><br class="typebreak"/>
&lt; TensorType, 0, PtrTraits &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (typename TensorType::DataType val)</td></tr>
<tr class="separator:a5c15de3c68277e250091885b6d139d52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5e19466a069a7a4e34f0c6f2fc41be8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab5e19466a069a7a4e34f0c6f2fc41be8"></a>
__host__ __device__&#160;</td><td class="memItemRight" valign="bottom"><b>operator typename TensorType::DataType &amp;</b> ()</td></tr>
<tr class="separator:ab5e19466a069a7a4e34f0c6f2fc41be8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0806e094dc320ac29ab115c861fe577"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae0806e094dc320ac29ab115c861fe577"></a>
__host__ __device__&#160;</td><td class="memItemRight" valign="bottom"><b>operator const typename TensorType::DataType &amp;</b> () const </td></tr>
<tr class="separator:ae0806e094dc320ac29ab115c861fe577"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9f0ba5f87d35fec263d789e4dbea809"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac9f0ba5f87d35fec263d789e4dbea809"></a>
__host__ __device__ <br class="typebreak"/>
TensorType::DataType *&#160;</td><td class="memItemRight" valign="bottom"><b>operator&amp;</b> ()</td></tr>
<tr class="separator:ac9f0ba5f87d35fec263d789e4dbea809"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6e6b826b5afb4fb26d5259641c46e17"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af6e6b826b5afb4fb26d5259641c46e17"></a>
__host__ __device__ const <br class="typebreak"/>
TensorType::DataType *&#160;</td><td class="memItemRight" valign="bottom"><b>operator&amp;</b> () const </td></tr>
<tr class="separator:af6e6b826b5afb4fb26d5259641c46e17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae8c90b402493f5656f94701157a7417"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aae8c90b402493f5656f94701157a7417"></a>
__host__ __device__ <br class="typebreak"/>
TensorType::DataPtrType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#aae8c90b402493f5656f94701157a7417">data</a> ()</td></tr>
<tr class="memdesc:aae8c90b402493f5656f94701157a7417"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a raw accessor to our slice. <br/></td></tr>
<tr class="separator:aae8c90b402493f5656f94701157a7417"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a750047ff919799af43b4861b580c82e3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a750047ff919799af43b4861b580c82e3"></a>
__host__ __device__ const <br class="typebreak"/>
TensorType::DataPtrType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#a750047ff919799af43b4861b580c82e3">data</a> () const </td></tr>
<tr class="memdesc:a750047ff919799af43b4861b580c82e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a raw accessor to our slice (const). <br/></td></tr>
<tr class="separator:a750047ff919799af43b4861b580c82e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67bfa92466e03834b7f007cb9cdf8d50"><td class="memTemplParams" colspan="2"><a class="anchor" id="a67bfa92466e03834b7f007cb9cdf8d50"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:a67bfa92466e03834b7f007cb9cdf8d50"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ T &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#a67bfa92466e03834b7f007cb9cdf8d50">as</a> ()</td></tr>
<tr class="memdesc:a67bfa92466e03834b7f007cb9cdf8d50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cast to a different datatype. <br/></td></tr>
<tr class="separator:a67bfa92466e03834b7f007cb9cdf8d50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1d375e64756991dadeb5a1e63ed2cfd"><td class="memTemplParams" colspan="2"><a class="anchor" id="ad1d375e64756991dadeb5a1e63ed2cfd"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:ad1d375e64756991dadeb5a1e63ed2cfd"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ const T &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#ad1d375e64756991dadeb5a1e63ed2cfd">as</a> () const </td></tr>
<tr class="memdesc:ad1d375e64756991dadeb5a1e63ed2cfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cast to a different datatype (const). <br/></td></tr>
<tr class="separator:ad1d375e64756991dadeb5a1e63ed2cfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23e80555a443797d60ae16d605dacd23"><td class="memTemplParams" colspan="2"><a class="anchor" id="a23e80555a443797d60ae16d605dacd23"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:a23e80555a443797d60ae16d605dacd23"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ PtrTraits<br class="typebreak"/>
&lt; T &gt;::PtrType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#a23e80555a443797d60ae16d605dacd23">dataAs</a> ()</td></tr>
<tr class="memdesc:a23e80555a443797d60ae16d605dacd23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cast to a different datatype. <br/></td></tr>
<tr class="separator:a23e80555a443797d60ae16d605dacd23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ec3a48f265de627490e7cdf540e9fc5"><td class="memTemplParams" colspan="2"><a class="anchor" id="a0ec3a48f265de627490e7cdf540e9fc5"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:a0ec3a48f265de627490e7cdf540e9fc5"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ PtrTraits<br class="typebreak"/>
&lt; const T &gt;::PtrType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#a0ec3a48f265de627490e7cdf540e9fc5">dataAs</a> () const </td></tr>
<tr class="memdesc:a0ec3a48f265de627490e7cdf540e9fc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cast to a different datatype (const) <br/></td></tr>
<tr class="separator:a0ec3a48f265de627490e7cdf540e9fc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac44400045b113c527d6ed59a910f885c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac44400045b113c527d6ed59a910f885c"></a>
__device__ TensorType::DataType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#ac44400045b113c527d6ed59a910f885c">ldg</a> () const </td></tr>
<tr class="memdesc:ac44400045b113c527d6ed59a910f885c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use the texture cache for reads. <br/></td></tr>
<tr class="separator:ac44400045b113c527d6ed59a910f885c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa56767066e40a4758e37b26e43449f1d"><td class="memTemplParams" colspan="2"><a class="anchor" id="aa56767066e40a4758e37b26e43449f1d"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:aa56767066e40a4758e37b26e43449f1d"><td class="memTemplItemLeft" align="right" valign="top">__device__ T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#aa56767066e40a4758e37b26e43449f1d">ldgAs</a> () const </td></tr>
<tr class="memdesc:aa56767066e40a4758e37b26e43449f1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use the texture cache for reads; cast as a particular type. <br/></td></tr>
<tr class="separator:aa56767066e40a4758e37b26e43449f1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a8902a0c07b878f29c3866a9173893f68"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8902a0c07b878f29c3866a9173893f68"></a>
__host__ __device__&#160;</td><td class="memItemRight" valign="bottom"><b>SubTensor</b> (TensorType &amp;t, typename TensorType::DataPtrType <a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#aae8c90b402493f5656f94701157a7417">data</a>)</td></tr>
<tr class="separator:a8902a0c07b878f29c3866a9173893f68"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a6e0f585a739cd1474ec24f56609d6501"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6e0f585a739cd1474ec24f56609d6501"></a>
TensorType &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#a6e0f585a739cd1474ec24f56609d6501">tensor_</a></td></tr>
<tr class="memdesc:a6e0f585a739cd1474ec24f56609d6501"><td class="mdescLeft">&#160;</td><td class="mdescRight">The tensor we're referencing. <br/></td></tr>
<tr class="separator:a6e0f585a739cd1474ec24f56609d6501"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a548d4edb57d072be52cd827f055d6d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6a548d4edb57d072be52cd827f055d6d"></a>
TensorType::DataPtrType const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#a6a548d4edb57d072be52cd827f055d6d">data_</a></td></tr>
<tr class="memdesc:a6a548d4edb57d072be52cd827f055d6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Where our value is located. <br/></td></tr>
<tr class="separator:a6a548d4edb57d072be52cd827f055d6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a5aa8367d35e6c281c29855d7cf24bd6d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5aa8367d35e6c281c29855d7cf24bd6d"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#a5aa8367d35e6c281c29855d7cf24bd6d">SubTensor&lt; TensorType, 1, PtrTraits &gt;</a></td></tr>
<tr class="memdesc:a5aa8367d35e6c281c29855d7cf24bd6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">One dimension greater can create us. <br/></td></tr>
<tr class="separator:a5aa8367d35e6c281c29855d7cf24bd6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1086b6201fb3ed3bfbbf8a38a3d2913"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af1086b6201fb3ed3bfbbf8a38a3d2913"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor_3_01TensorType_00_010_00_01PtrTraits_01_4.html#af1086b6201fb3ed3bfbbf8a38a3d2913">Tensor&lt; typename TensorType::DataType, 1, TensorType::IsInnerContig, typename TensorType::IndexType, PtrTraits &gt;</a></td></tr>
<tr class="memdesc:af1086b6201fb3ed3bfbbf8a38a3d2913"><td class="mdescLeft">&#160;</td><td class="mdescRight">Our parent tensor can create us. <br/></td></tr>
<tr class="separator:af1086b6201fb3ed3bfbbf8a38a3d2913"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename TensorType, template&lt; typename U &gt; class PtrTraits&gt;<br/>
class faiss::gpu::detail::SubTensor&lt; TensorType, 0, PtrTraits &gt;</h3>

<p>Specialization for a view of a single value (0-dimensional) </p>

<p>Definition at line <a class="el" href="Tensor_8cuh_source.html#l00376">376</a> of file <a class="el" href="Tensor_8cuh_source.html">Tensor.cuh</a>.</p>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li>/data/users/hoss/faiss/gpu/utils/<a class="el" href="Tensor_8cuh_source.html">Tensor.cuh</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
